package com.itlong.cloud.POJO.PO;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import com.itlong.cloud.enumerate.CloudElevatorChangeBusinessEnum;
import com.itlong.cloud.enumerate.SmartCommunityEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;


/**
 *
 * <desc>
 *      云电梯--业务变更点通知
 * </desc>
 *
 * @createDate 2018/04/03
 */
@ItlTables("device_business_elevator_change_log")
@Data
@NoArgsConstructor()
@EqualsAndHashCode(callSuper=true)
public class DeviceBusinessElevatorChangeLogPO extends BasePO implements Serializable {

    @ItlField("command_type")
    private Integer commandType;        //业务指令，业务指令，1-项目信息、2-固定密码信息、3-设备信息、4-房间全量、5-云电梯业务服务器地址变更

    @ItlField("command_parameter")
    private String commandParameter;    //业务变更通知参数

    @ItlField("command_des")
    private String commandDes;          //业务变更描述

    @ItlField("project_id")
    private String projectId;           //项目编号

    @ItlField("command_status")
    private Integer commandStatus;      //处理状态 0待处理 1已处理



    /**
     * <desc>
     *     云电梯业务变更点通知
     * </desc>
     * @param smartCommunityEnum
     * @param commandParameterJSArr JSONArray格式数据
     */
    public DeviceBusinessElevatorChangeLogPO(String projectId,CloudElevatorChangeBusinessEnum smartCommunityEnum, String commandParameterJSArr) {
        this.commandType = smartCommunityEnum.getCommandType();
        this.commandDes = smartCommunityEnum.getCommandDes();
        this.commandParameter = commandParameterJSArr;
        this.projectId = projectId;
    }


}